package org.wattdepot.modbus.meter.shark;

import static org.junit.Assert.assertEquals;
import org.junit.Test;
import org.wattdepot.simulation.basic.Basic;
import org.wattdepot.simulation.core.Simulation;

/**
 * Tests the Shark meter.
 * 
 * @author BaoHuy Ung, Alan Lee, Edwin Lim, and Anthony Xu.
 */
public class TestSharkSlave {

  /**
   * Tests the accessor and mutator methods in Basic.
   * 
   * @throws Exception If problems occur.
   */
  @Test
  public void testAccessorMutator() throws Exception {
    Simulation testSimulation = new Basic();
    testSimulation.setBitsForPT(1);
    testSimulation.setEnergy(2);
    testSimulation.setIntBits(3);
    testSimulation.setLimit(4);
    testSimulation.setPT2(5);
    //assertEquals("Checking get and set for ptBits", testSimulation.getBitsForPT(), 
      //Float.floatToIntBits(1));
    assertEquals("Checking get and set for energy", testSimulation.getEnergy(), 2);
    //assertEquals("Checking get and set for bits", testSimulation.getIntBits(), 
      //Float.floatToIntBits(3));
    assertEquals("Checking get and set for limit", testSimulation.getLimit(), 4);
    assertEquals("Checking get and set for pt2Bits", testSimulation.getPT2(), 5);    
  }
  
}
